#include "../../h/apue.h"
#include <fcntl.h>

int main(void)
{
    size_t pathlen;
    char * buf = path_alloc(&pathlen);

    if (symlink("kakakx", "aaa-link") < 0)
        err_sys("create symlink failed");
    else
        printf("create symlink succeed.\n");

    if (readlink("aaa-link", buf, pathlen) < 0)
        err_sys("readlink failed");
    else
        printf("symlink content: %s.\n", buf);

}
